
const mongoose = require('./db')

const xicheCate = new mongoose.Schema({
    cate: String
})

const XiHeSchema = new mongoose.Schema({
    name: String, //司机名称
    tel: String,//手机号码
    start: String,//开始时间
    end: String, //结束时间
    carid: {
        type: mongoose.Schema.Types.ObjectId,
        ref: 'xichetype'
    },
    // 预约编号
    yuey: Boolean,// 预约类型
    beizhu: String, //备注信息
    nums: Number //盒子数量
})


const XihedengjiSchema = new mongoose.Schema({
    djbianh: String, //登记编号
    carsnum: String, //车牌号码
    cartype: String, //车辆类型
    sjname: String, //司机姓名
    tel: String, //手机号码
    starts: String, //登记时间
    nums: Number, //盒子数量
    qj: String, //清洁情况
    memy: Number, //缴费金额
    beizhu: String //备注
})
const XiheSchema=new mongoose.Schema({
    myrbianh: String, //登记编号
    myrcarhao: String,//车牌号码
    cartype: String,//车辆类型
    name: String,//司机姓名
    tel: String,//手机号码
    myrstart: String,//登记时间
    nums:Number,//盒子数量
    myrend:String,//洗盒时间
    qingkuang:Boolean,//清洁情况
    memy:Number,//缴费金额
    beizhu: String//备注
})
const xihebaobiaoSchema=new mongoose.Schema({
    myrbianh: String,//登记编号
    myrcarhao: String,//车牌号码
    nums:Number,//盒子数量
    myrstart: String,//登记时间
    myrend:String,//洗盒时间
    gan:Number,//干净
    chong:Number,//虫卵
    chan:Number,//残渣
    qita:Number//其他数量
})
const Xiche = mongoose.model('xiche', XiHeSchema, 'xiche') //洗盒登记
const Xichetype = mongoose.model('xichetype', xicheCate, 'xichetype') // 洗盒类型
const Xichedengji = mongoose.model(' Xihedengji', XihedengjiSchema, ' Xihedengji') //洗盒记录
const Xihejilu=mongoose.model('XiheSchema',XiheSchema,'XiheSchema')
const xihebaobiao=mongoose.model('xihebaobiaoSchema',xihebaobiaoSchema,'xihebaobiaoSchema')
module.exports = { Xiche, Xichetype,Xichedengji,Xihejilu,xihebaobiao}

const mongoose = require('./db');

let carRegisterSchema = new mongoose.Schema({
    name: String,  //司机名称
    phone: String, //司机电话
    code: String, //洗车编号
    carmark: String, //车牌号
    time: Date, //开始洗车时间
    etime: Date, //结束洗车时间
    type: Number, //洗车类型
    price: Number, //洗车价格
})

let carRegisterModel = mongoose.model('carRegister', carRegisterSchema, 'carRegister')

module.exports = {
    carRegisterModel
}

